<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Content_Ajax extends CI_Controller {

    function __construct() {
        parent::__construct();
    }

    function ajax_list_transaksi() {
        $output['id_request'] = mysql_real_escape_string($this->input->post('id_request'));
        $output['status'] = mysql_real_escape_string($this->input->post('status'));
        $rc = "00";
        $resp = "";
        $data = $this->load->view("content_ajax/ajax_log_transaksi", $output, true);
        echo json_encode(array("err_code" => $rc, "msg" => $resp, "data_html" => $data));
    }

    function ajax_get_pesan() {
        $id_request = mysql_real_escape_string($this->input->post('id_request'));
        $query = "select * from request_transaksi where id_request=" . $id_request;
        $result = mysql_query($query);
        $row = mysql_fetch_assoc($result);
        $pesan = $row['bill_info1'];
        echo json_encode(array("pesan" => $pesan));
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */
